﻿namespace CMS.Common
{
    public struct Priority
    {
        public const int Lowest = 0;
        public const int Low = 1;
        public const int Normal = 2;
        public const int High = 3;
        public const int Highest = 4;
    }

    /// <summary>
    /// Constants
    /// </summary>
    public partial class Constants
    {
        public const string ITEM_ALL = "All";
        public const int ITEM_VALUE_ALL = -1;

        public struct RegularExpression
        {
            public const string EMAIL = @"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}";
            public const string FILE_NAME = @"^[a-zA-Z0-9_\s-]+$";
            public const string PHONE = @"^\(\d{3}\)\s\d{3}\-\d{4}$";
            public const string FAX = @"^\(\d{3}\)\d{3}-\d{4}$"; ////^(\([0-9]{3}\)|^[0-9]{3})([0-9]{3})(\-)([0-9]{4})$
            public const string ZIP_CODE = @"^\d{5}(-____|-\d{4}|)$";
            public const string TAXID = @"^\d{2}-\d{7}";
            public const string DATE = @"^(?:^(?:(?:(?:(?:(?:0?[13578]|1[02])/31)|(?:(?:0?[13-9]|1[0-2])/(?:29|30)))/(?:1[6-9]|[2-9][0-9])[0-9]{2})|(?:0?2/29/(?:(?:(?:1[6-9]|[2-9][0-9])(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))|(?:(?:0?[1-9])|(?:1[0-2]))/(?:0?[1-9]|1[0-9]|2[0-8])/(?:(?:1[6-9]|[2-9][0-9])[0-9]{2}))$)$";
            public const string AMOUNT = @"^\s*(\+|-)?((\d+(\.\d\d)?)|(\.\d\d))\s*$";

            public const string DATEVALID =
                @"^([0]\d|[1][0-2])\/([0-2]\d|[3][0-1])\/([2][01]|[1][6-9])\d{2}(\s([0-1]\d|[2][0-3])(\:[0-5]\d){1,2})?$";
        }

        public struct ErrorMessages
        {
            public const string IS_REQUIRED_FIELD = "{0} is required.";
        }

        public struct ModuleNames
        {
            public const string UserInformation = "UserInformation";
        }

        public struct MasterPages
        {
        }

        public struct Sessions
        {
            public const string CurrentUserInfo = "CurrentUserInfo";
        }

        public struct Sortings
        {
            public const string ASC = "ASC";
            public const string DESC = "DESC";
            public const string ASCENDING = "ASCENDING";
            public const string DESCENDING = "DESCENDING";
        }
    }
}